package com.jt.service;

import com.jt.anno.Cache;
import org.springframework.stereotype.Service;

@Service
public class DeptServiceImpl implements DeptService {
    @Override
    public void addDept() {
        System.out.println("添加");
    }

    @Override
    @Cache //被注解标识
    public void updateDept() {
        System.out.println("更新");
    }

    @Override
    @Cache
    public String after(Integer id) {
        return "Spring通知的测试";
    }

    @Override
    @Cache
    public void afterThrow() {
        System.out.println("用户执行目标方法");
        int a = 1/0;

    }

    @Override
    @Cache
    public void doAround() {
        System.out.println("实现用户数据的入库操作");
    }
}
